// 宏队列
setTimeout(() => {
  console.log('timeout');
}, 0);   

// 微队列(优先宏队列执行)
Promise.resolve(1).then(
  value => console.log('成功1',value)
)

Promise.resolve(2).then(
  value => console.log('成功2',value)
)


console.log('主线程');